package reseaux.client;

import java.io.IOException;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class Client {

	public static void main(String[] args) 
	{
		Socket socket;
		PrintWriter out;
		
		
		try {
			socket = new Socket(InetAddress.getLocalHost(),2009);
			
			out = new PrintWriter(socket.getOutputStream(), true);
			System.out.println("===Writing a message===");
			out.print("Hello word");
			out.flush();
			
			
			socket.close();
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
